(function () {
    const userInfo = [{
        name: "wbl",
        password: "123"
    }]
    sign_in.onclick = verification;
    function verification() {
        const sign_in = document.querySelector("#sign_in");
        const name = document.querySelector("#name");
        const password = document.querySelector("#password");

        for (var i = 0; i < userInfo.length; i++) {
            if (name.value == userInfo[i].name) {
                if (password.value == userInfo[i].password) {
                    sign_in.target = "_self";
                    sign_in.href = "./index.html";
                } else {
                    alert("密码错误");
                    password.value = "";
                }
            } else {
                alert("用户名错误");
                name.value = "";
                password.value = "";
            }
            // console.log(sign_in)
        }
    }
})()